<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/common.css"/>
		<link rel="stylesheet" type="text/css" href="js/uploadify/uploadify.css"/>
		<style type="text/css">
			#t2{
				display: none;
			}
			.hide{
				display: none;
			}
			.active{
				display: block;
			}
		</style>
	</head>
	<body>
		<div class="content">
			<a href="http://insight-movie-database.gdinsight.com"><img class="logo" src="img/logo.jpg"/></a>
			<h1 id="t1">需求表单(三维后期)</h1>
			<h1 id="t2">需求表单(影视拍摄)</h1>
			<p id="email" email='' style="display: none;"></p>
			<a href="http://insight-movie-database.gdinsight.com" style='float: right;margin-top: -9px;'>返回首页</a>
			<div class="underline"></div>
			<form action="" method="post">
				<div class="type">
					<div class="title fl">需求类型&nbsp;&nbsp;&nbsp;</div>
					<div class="fl">
						<a  class="type_a pointer active_t" onclick="Tab(1)">三维后期</a>
						<a  class="type_a pointer" onclick="Tab(2)">影视拍摄</a>
					</div>
					<br />
				</div>
				<!-- 三维后期 -->
				<div id="d1" number="1" class="active">
					<p class="order_code hide" name="201"></p>
					<div class="time">
						<p class='ord_title'>
							<span>订单标题&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<input type="text" name="order_title" id="" value="" class="post" />	
						</p>						
 						<div class="input_25 fl">
							<span>输出尺寸&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<input type="text" name="works_size" id="" value="" class="post" />	
						</div>
						
						<div class="input_25 fl">
							<span>影片长度&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<input type="text" name="video_len" id="" value="" class="post" />
						</div>
						
						<div class="input_25 fl">
							<span>影片版本&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<input type="text" name="video_ver" id="" value="" class="post"/>	
						</div>
						
						<div class="input_25 fl margin_b20">
							<span>制作预算&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<input type="text" name="budget" id="" value="" class="post"/>	
						</div>
						
						<div class="input_25 fl">
							<span>交片时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<input type="text" name="delivery_time" id="delivery_time" id="" value="" class="post"/>	
						</div> 
						<div class="clear"></div>
					</div>
					
					
					<div class="time">
					
						<div class="fl" style='width: 88px;'>备注&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
						<textarea class="fl post" name="content_2" rows="" cols="" ></textarea>
						<div class="clear"></div>
						<div class="fl" style='width: 88px;'>音乐要求（作曲，选曲）</div>
						<textarea class="fl post" name="expand_music" rows="" cols="" ></textarea>
						<div class="clear"></div>
						<div class="fl" style='width: 88px;'>版权要求（范围、年限）</div>
						<textarea class="fl post" name="expand_copyright" rows="" cols="" ></textarea>
						<div class="clear"></div>
						<div class="fl" style='width: 88px;'>配音</div>
						<textarea class="fl post" name="expand_cv" rows="" cols="" ></textarea>
						<div class="clear"></div>
					</div>
					
					<div class="fl">参考片&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
					<div class="fl"><input class=""  id="file_upload" name="file_upload" type="file" multiple="true" /></div>
					<p class="fl red">（*请上传pdf,ppt,excel,word,mp3,jpeg,tiff格式的文件）</p>
					<div class="clear"></div>
					<div class="file_upload img_path">
						<div class="clear"></div>
					</div>
				</div>
				<!-- 影视拍摄 -->
				<div id="d2" number="2" class="hide">
					<p class="order_code hide" name="202"></p>
					<div class="time">
						<p class='ord_title'>
							<span>订单标题&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<input type="text" name="order_title" id="" value="" class="post" />	
						</p>						
						<div class="input_25 fl">
							<span>输出尺寸&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<input type="text" name="works_size" id="" value="" class="post" />	
						</div>
						
						<div class="input_25 fl">
							<span>影片长度&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<input type="text" name="video_len" id="" value="" class="post" />
						</div>
						
						<div class="input_25 fl">
							<span>影片版本&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<input type="text" name="video_ver" id="" value="" class="post"/>	
						</div>
						
						<div class="input_25 fl margin_b20">
							<span>使用范围&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<input type="text" name="range" id="" value="" class="post"/>	
						</div>
						
						
						<div class="input_25 fl">
							<span>使用时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<input type="text" name="use_time" id="use_time" value="" class="post" />	
						</div>
						
						<div class="input_25 fl">
							<span>交片时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<input type="text" name="delivery_time" id="delivery_time2" value="" class="post" />
						</div>
						
						<div class="input_25 fl">
							<span>拍摄地点&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<input type="text" name="filming_location" id="" value="" class="post"/>	
						</div>
						
						<div class="input_25 fl margin_b20">
							<span>制作预算&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<input type="text" name="budget" id="" value="" class="post"/>	
						</div>
						
						<div class="clear"></div>
						
						
					</div>
					
					<div class="fl" >导演要求&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
					<textarea class="fl post" name="content_1" rows="" cols="" ></textarea>
					<div class="clear"></div>
					
					<div class="fl">特殊需求&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
					<textarea class="fl post" name="content_2" rows="" cols="" ></textarea>
					<div class="clear"></div>
					
					<div class="fl" style='width:88px'>音乐要求（作曲，选曲）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
					<textarea class="fl post" name="expand_music" rows="" cols="" ></textarea>
					<div class="clear"></div>
					
					<div class="fl" style='width:88px'>配音&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
					<textarea class="fl post" name="expand_cv" rows="" cols="" ></textarea>
					<div class="clear"></div>
					
					<div class="fl">参考片&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
					<div class="fl"><input class=""  id="file_upload_ysps" name="file_upload" type="file" multiple="true" /></div>
					<p class="fl red">（*请上传pdf,ppt,excel,word,mp3,jpeg,tiff格式的文件）</p>
					<div class="clear"></div>
					<div class="file_upload_ysps img_path">
						<div class="clear"></div>
					</div>
					
				</div>
				
				
				
				<br />
				<input type="button" id="submit" value="提交需求" class="fr submit"/>
			</form>
		</div>
		
		<script src="js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
		<script src="jedate/jedate.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/uploadify/jquery.uploadify.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/common.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			//登录检查
			$.ajax({
				type:"post",
				url:"./app/index.php?m=index&a=islogin",
				success:function(ret){
					if(ret.code == '101'){
						window.location.href='./login.html';
					}
				}
			});
			function Tab(num){
				$(this).attr("color","white");
				$(this).attr("background-color","black");
			    var i;
			    for(i=1;i<=2;i++)
			    {
			        if(i==num){
			        	document.getElementById("t"+i).style.display="block";
			        	$("#d"+i).addClass("active")
			         	$("#d"+i).removeClass("hide")
			        }else{
			         	document.getElementById("t"+i).style.display="none";
			        	$("#d"+i).addClass("hide")
			         	$("#d"+i).removeClass("active")
			        }
			           
			    }
			}
			
			
			var arr = [];
			var file_upload=[]
			var file_upload_ysps=[]
			//图片上传
			$(function() {
			    $('#file_upload').uploadify({
			        'swf'      : './js/uploadify/uploadify.swf',    //指定上传控件的主体文件
			        'uploader' : './app/index.php?m=index&a=upload' ,   //指定服务器端上传处理文件
			        'fileTypeExts':'*.mp4;*.mov;*.pdf;*.ppt;*.pptx;*.xlsx;*xls;*.doc;*.mp3;*.docx;*.jpeg;*.tiff;',
			        'buttonText'  : '上传',  //按钮文字
			        'method':'post',
			        'onUploadComplete':function(){
			        },
			        'onUploadSuccess': function (fileObj, data, response) {
			        	data = JSON.parse(data);
			        	arr.push(data);
/* 			        	var html = "<p>视频已上传成功。</p>";
			        	$(".file_upload").prepend(html); */
			        	file_upload.push(data.path);
			        	
			        	after_upload(data,".file_upload",file_upload)
			        	
			        }
			    });
			    
			    $('#file_upload_ysps').uploadify({
			        'swf'      : './js/uploadify/uploadify.swf',    //指定上传控件的主体文件
			        'uploader' : './app/index.php?m=index&a=upload' ,   //指定服务器端上传处理文件
			        'fileTypeExts':'*.mp4;*.mov;*.pdf;*.ppt;*.pptx;*.xlsx;*xls;*.doc;*.mp3;*.docx;*.jpeg;*.tiff;',
			        'buttonText'  : '上传',  //按钮文字
			        'method':'post',
			        'onUploadComplete':function(){
			        },
			        'onUploadSuccess': function (fileObj, data, response) {
			        	data = JSON.parse(data);
			        	file_upload_ysps.push(data.path);
			        	
			        	after_upload(data,".file_upload_ysps",file_upload_ysps)
			        	
			        }
			    });    
			    
			});
			
			
			var imgobj1 = {file_upload};
			var imgobj2 = {file_upload_ysps};
			
			jeDate({
				dateCell:"#delivery_time",//isinitVal:true,
				format:"YYYY-MM-DD"
			})
			jeDate({
				dateCell:"#delivery_time2",//isinitVal:true,
				format:"YYYY-MM-DD"
			})
			jeDate({
				dateCell:"#use_time",//isinitVal:true,
				format:"YYYY-MM-DD"
			})
			
			$("#submit").click(function(){
				var num = $(".active").attr("number");
				if(num == "1"){
					data_post(imgobj1)
				}else if(num == "2"){
					data_post(imgobj2)
				}
			})
			
			$(".pointer").click(function(){
				$(this).addClass("active_t")
				$(this).siblings().removeClass("active_t")
			})
		</script>
	</body>
</html>